<?php $topic_ls = dt_query("SELECT id, title, user_name, reply_c, view_c, digest, today, l_r_at, c_at, today_up_c, pay, l_r_user_name FROM forum_topic WHERE forum_id = ".$topic['forum_id']." AND c_at > ".(time()-30*24*3600)." ORDER BY rand() LIMIT 5") ?>	
<div class="container">
	<div class="col-md-12 column forum-topic-list">
		<?php while($topic_l = mysql_fetch_array($topic_ls)) { ?>
		<div class="forum-topic">
			<div class="num hidden-xs">
				<span>回复<em><?php echo $topic_l['reply_c'] ?></em></span>
				<span>浏览<em><?php echo $topic_l['view_c'] ?></em></span>
			</div>
			<div class="subject">
				<p class="title">
				<?php if (1 == $topic_l['digest']) { ?><span class="glyphicon glyphicon-fire"></span> <?php } ?>
				<?php $is_today = (date('Ymd', time()) == $topic_l['today']) ? true : false ?>
				<a target="_blank" <?php echo ($is_today) ? 'style="color:#'.rand_color().'"' : null ?> href="<?php echo s_url('?c=forum&a=topic_show&topic_id='.$topic_l['id']) ?>"><?php echo $topic_l['title'] ?></a> 
				<?php echo (time()-24*3600 < $topic_l['l_r_at']) ? '<span class="label label-default">热</span>' : null ?>
				<?php echo (time()-24*3600 < $topic_l['c_at']) ? '<span class="label label-success">新</span>' : null ?>
				<?php echo ($is_today) ? '<b class="label label-warning">'.$topic_l['today_up_c'].'</b>' : null ?>
				<?php if (0 < $topic_l['pay']) { ?>
				<span class="label label-danger">$ <?php echo intval($topic_l['pay']) ?></span>
				<?php } ?>
				</p>
				<p class="info">
				<a target="_blank" href="<?php echo s_url('?c=center&a=index&user_id='.$topic_l['user_id']) ?>"><?php echo $topic_l['user_name'] ?></a><span><?php echo date("Y-m-d",$topic_l['c_at']) ?></span>
				<span class="hidden-xs">最后回复：<a target="_blank" href="<?php echo s_url('?c=center&a=index&user_id='.$topic_l['l_r_user_id']) ?>"><?php echo $topic_l['l_r_user_name'] ?></a><span><a target="_blank" href="<?php echo s_url('?c=forum&a=to_topic_show_end&topic_id='.$topic_l['id']) ?>"><?php echo date("m-d H:i",$topic_l['l_r_at']) ?></a></span></span>
				</p>
			</div>
		</div>
		<?php } ?>
	</div>
</div>
